3.2.47 \(\int (c+d x)^m (a+a \sin (e+f x))^2 \, dx\) [147]

3.2.47.1 Optimal result
3.2.47.2 Mathematica [A] (verified)
3.2.47.3 Rubi [A] (verified)
3.2.47.4 Maple [F]
3.2.47.5 Fricas [A] (verification not implemented)
3.2.47.6 Sympy [F]
3.2.47.7 Maxima [F]
3.2.47.8 Giac [F]
3.2.47.9 Mupad [F(-1)]

3.2.47.1 Optimal result

Integrand size = 20, antiderivative size = 299 \[ \int (c+d x)^m (a+a \sin (e+f x))^2 \, dx=\frac {3 a^2 (c+d x)^{1+m}}{2 d (1+m)}-\frac {a^2 e^{i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,-\frac {i f (c+d x)}{d}\right )}{f}-\frac {a^2 e^{-i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,\frac {i f (c+d x)}{d}\right )}{f}+\frac {i 2^{-3-m} a^2 e^{2 i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,-\frac {2 i f (c+d x)}{d}\right )}{f}-\frac {i 2^{-3-m} a^2 e^{-2 i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,\frac {2 i f (c+d x)}{d}\right )}{f} \]

output
3/2*a^2*(d*x+c)^(1+m)/d/(1+m)-a^2*exp(I*(e-c*f/d))*(d*x+c)^m*GAMMA(1+m,-I* 
f*(d*x+c)/d)/f/((-I*f*(d*x+c)/d)^m)-a^2*(d*x+c)^m*GAMMA(1+m,I*f*(d*x+c)/d) 
/exp(I*(e-c*f/d))/f/((I*f*(d*x+c)/d)^m)+I*2^(-3-m)*a^2*exp(2*I*(e-c*f/d))* 
(d*x+c)^m*GAMMA(1+m,-2*I*f*(d*x+c)/d)/f/((-I*f*(d*x+c)/d)^m)-I*2^(-3-m)*a^ 
2*(d*x+c)^m*GAMMA(1+m,2*I*f*(d*x+c)/d)/exp(2*I*(e-c*f/d))/f/((I*f*(d*x+c)/ 
d)^m)
 
3.2.47.2 Mathematica [A] (verified)

Time = 0.20 (sec) , antiderivative size = 260, normalized size of antiderivative = 0.87 \[ \int (c+d x)^m (a+a \sin (e+f x))^2 \, dx=\frac {1}{8} a^2 (c+d x)^m \left (\frac {12 (c+d x)}{d (1+m)}-\frac {8 e^{i \left (e-\frac {c f}{d}\right )} \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,-\frac {i f (c+d x)}{d}\right )}{f}-\frac {8 e^{-i \left (e-\frac {c f}{d}\right )} \left (\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,\frac {i f (c+d x)}{d}\right )}{f}+\frac {i 2^{-m} e^{2 i \left (e-\frac {c f}{d}\right )} \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,-\frac {2 i f (c+d x)}{d}\right )}{f}-\frac {i 2^{-m} e^{-2 i \left (e-\frac {c f}{d}\right )} \left (\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,\frac {2 i f (c+d x)}{d}\right )}{f}\right ) \]

input
Integrate[(c + d*x)^m*(a + a*Sin[e + f*x])^2,x]
 
output
(a^2*(c + d*x)^m*((12*(c + d*x))/(d*(1 + m)) - (8*E^(I*(e - (c*f)/d))*Gamm 
a[1 + m, ((-I)*f*(c + d*x))/d])/(f*(((-I)*f*(c + d*x))/d)^m) - (8*Gamma[1 
+ m, (I*f*(c + d*x))/d])/(E^(I*(e - (c*f)/d))*f*((I*f*(c + d*x))/d)^m) + ( 
I*E^((2*I)*(e - (c*f)/d))*Gamma[1 + m, ((-2*I)*f*(c + d*x))/d])/(2^m*f*((( 
-I)*f*(c + d*x))/d)^m) - (I*Gamma[1 + m, ((2*I)*f*(c + d*x))/d])/(2^m*E^(( 
2*I)*(e - (c*f)/d))*f*((I*f*(c + d*x))/d)^m)))/8
 
3.2.47.3 Rubi [A] (verified)

Time = 0.63 (sec) , antiderivative size = 293, normalized size of antiderivative = 0.98, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3042, 3799, 3042, 3793, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (c+d x)^m (a \sin (e+f x)+a)^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (c+d x)^m (a \sin (e+f x)+a)^2dx\)

\(\Big \downarrow \) 3799

\(\displaystyle 4 a^2 \int (c+d x)^m \sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )dx\)

\(\Big \downarrow \) 3042

\(\displaystyle 4 a^2 \int (c+d x)^m \sin \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )^4dx\)

\(\Big \downarrow \) 3793

\(\displaystyle 4 a^2 \int \left (-\frac {1}{8} \cos (2 e+2 f x) (c+d x)^m+\frac {1}{2} \sin (e+f x) (c+d x)^m+\frac {3}{8} (c+d x)^m\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle 4 a^2 \left (-\frac {e^{i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (m+1,-\frac {i f (c+d x)}{d}\right )}{4 f}+\frac {i 2^{-m-5} e^{2 i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (m+1,-\frac {2 i f (c+d x)}{d}\right )}{f}-\frac {e^{-i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (m+1,\frac {i f (c+d x)}{d}\right )}{4 f}-\frac {i 2^{-m-5} e^{-2 i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (m+1,\frac {2 i f (c+d x)}{d}\right )}{f}+\frac {3 (c+d x)^{m+1}}{8 d (m+1)}\right )\)

input
Int[(c + d*x)^m*(a + a*Sin[e + f*x])^2,x]
 
output
4*a^2*((3*(c + d*x)^(1 + m))/(8*d*(1 + m)) - (E^(I*(e - (c*f)/d))*(c + d*x 
)^m*Gamma[1 + m, ((-I)*f*(c + d*x))/d])/(4*f*(((-I)*f*(c + d*x))/d)^m) - ( 
(c + d*x)^m*Gamma[1 + m, (I*f*(c + d*x))/d])/(4*E^(I*(e - (c*f)/d))*f*((I* 
f*(c + d*x))/d)^m) + (I*2^(-5 - m)*E^((2*I)*(e - (c*f)/d))*(c + d*x)^m*Gam 
ma[1 + m, ((-2*I)*f*(c + d*x))/d])/(f*(((-I)*f*(c + d*x))/d)^m) - (I*2^(-5 
 - m)*(c + d*x)^m*Gamma[1 + m, ((2*I)*f*(c + d*x))/d])/(E^((2*I)*(e - (c*f 
)/d))*f*((I*f*(c + d*x))/d)^m))
 

3.2.47.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3793
Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> In 
t[ExpandTrigReduce[(c + d*x)^m, Sin[e + f*x]^n, x], x] /; FreeQ[{c, d, e, f 
, m}, x] && IGtQ[n, 1] && ( !RationalQ[m] || (GeQ[m, -1] && LtQ[m, 1]))
 

rule 3799
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.) 
, x_Symbol] :> Simp[(2*a)^n   Int[(c + d*x)^m*Sin[(1/2)*(e + Pi*(a/(2*b))) 
+ f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 - b^ 
2, 0] && IntegerQ[n] && (GtQ[n, 0] || IGtQ[m, 0])
 
3.2.47.4 Maple [F]

\[\int \left (d x +c \right )^{m} \left (a +a \sin \left (f x +e \right )\right )^{2}d x\]

input
int((d*x+c)^m*(a+a*sin(f*x+e))^2,x)
 
output
int((d*x+c)^m*(a+a*sin(f*x+e))^2,x)
 
3.2.47.5 Fricas [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 270, normalized size of antiderivative = 0.90 \[ \int (c+d x)^m (a+a \sin (e+f x))^2 \, dx=-\frac {8 \, {\left (a^{2} d m + a^{2} d\right )} e^{\left (-\frac {d m \log \left (\frac {i \, f}{d}\right ) + i \, d e - i \, c f}{d}\right )} \Gamma \left (m + 1, \frac {i \, d f x + i \, c f}{d}\right ) - {\left (i \, a^{2} d m + i \, a^{2} d\right )} e^{\left (-\frac {d m \log \left (-\frac {2 i \, f}{d}\right ) - 2 i \, d e + 2 i \, c f}{d}\right )} \Gamma \left (m + 1, -\frac {2 \, {\left (i \, d f x + i \, c f\right )}}{d}\right ) + 8 \, {\left (a^{2} d m + a^{2} d\right )} e^{\left (-\frac {d m \log \left (-\frac {i \, f}{d}\right ) - i \, d e + i \, c f}{d}\right )} \Gamma \left (m + 1, \frac {-i \, d f x - i \, c f}{d}\right ) - {\left (-i \, a^{2} d m - i \, a^{2} d\right )} e^{\left (-\frac {d m \log \left (\frac {2 i \, f}{d}\right ) + 2 i \, d e - 2 i \, c f}{d}\right )} \Gamma \left (m + 1, -\frac {2 \, {\left (-i \, d f x - i \, c f\right )}}{d}\right ) - 12 \, {\left (a^{2} d f x + a^{2} c f\right )} {\left (d x + c\right )}^{m}}{8 \, {\left (d f m + d f\right )}} \]

input
integrate((d*x+c)^m*(a+a*sin(f*x+e))^2,x, algorithm="fricas")
 
output
-1/8*(8*(a^2*d*m + a^2*d)*e^(-(d*m*log(I*f/d) + I*d*e - I*c*f)/d)*gamma(m 
+ 1, (I*d*f*x + I*c*f)/d) - (I*a^2*d*m + I*a^2*d)*e^(-(d*m*log(-2*I*f/d) - 
 2*I*d*e + 2*I*c*f)/d)*gamma(m + 1, -2*(I*d*f*x + I*c*f)/d) + 8*(a^2*d*m + 
 a^2*d)*e^(-(d*m*log(-I*f/d) - I*d*e + I*c*f)/d)*gamma(m + 1, (-I*d*f*x - 
I*c*f)/d) - (-I*a^2*d*m - I*a^2*d)*e^(-(d*m*log(2*I*f/d) + 2*I*d*e - 2*I*c 
*f)/d)*gamma(m + 1, -2*(-I*d*f*x - I*c*f)/d) - 12*(a^2*d*f*x + a^2*c*f)*(d 
*x + c)^m)/(d*f*m + d*f)
 
3.2.47.6 Sympy [F]

\[ \int (c+d x)^m (a+a \sin (e+f x))^2 \, dx=a^{2} \left (\int 2 \left (c + d x\right )^{m} \sin {\left (e + f x \right )}\, dx + \int \left (c + d x\right )^{m} \sin ^{2}{\left (e + f x \right )}\, dx + \int \left (c + d x\right )^{m}\, dx\right ) \]

input
integrate((d*x+c)**m*(a+a*sin(f*x+e))**2,x)
 
output
a**2*(Integral(2*(c + d*x)**m*sin(e + f*x), x) + Integral((c + d*x)**m*sin 
(e + f*x)**2, x) + Integral((c + d*x)**m, x))
 
3.2.47.7 Maxima [F]

\[ \int (c+d x)^m (a+a \sin (e+f x))^2 \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{2} {\left (d x + c\right )}^{m} \,d x } \]

input
integrate((d*x+c)^m*(a+a*sin(f*x+e))^2,x, algorithm="maxima")
 
output
(d*x + c)^(m + 1)*a^2/(d*(m + 1)) + 1/2*(a^2*e^(m*log(d*x + c) + log(d*x + 
 c)) - (a^2*d*m + a^2*d)*integrate((d*x + c)^m*cos(2*f*x + 2*e), x) + 4*(a 
^2*d*m + a^2*d)*integrate((d*x + c)^m*sin(f*x + e), x))/(d*m + d)
 
3.2.47.8 Giac [F]

\[ \int (c+d x)^m (a+a \sin (e+f x))^2 \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{2} {\left (d x + c\right )}^{m} \,d x } \]

input
integrate((d*x+c)^m*(a+a*sin(f*x+e))^2,x, algorithm="giac")
 
output
integrate((a*sin(f*x + e) + a)^2*(d*x + c)^m, x)
 
3.2.47.9 Mupad [F(-1)]

Timed out. \[ \int (c+d x)^m (a+a \sin (e+f x))^2 \, dx=\int {\left (a+a\,\sin \left (e+f\,x\right )\right )}^2\,{\left (c+d\,x\right )}^m \,d x \]

input
int((a + a*sin(e + f*x))^2*(c + d*x)^m,x)
 
output
int((a + a*sin(e + f*x))^2*(c + d*x)^m, x)